<?php /* Smarty version 2.6.27, created on 2019-11-09 12:38:06
         compiled from cdkey/export.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 't', 'cdkey/export.tpl', 49, false),)), $this); ?>
<table class="itable itable-color">
    <tr>
        <td width="100px">批号：</td>
        <td>
            <select name="batch_id" id = 'batch' onclick="checkPi(this)">
                <option value=""> 请选择 </option>

                <?php $_from = $this->_tpl_vars['batch']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
                    <option value="<?php echo $this->_tpl_vars['item']['id']; ?>
"> <?php echo $this->_tpl_vars['item']['name']; ?>
 </option>
                <?php endforeach; endif; unset($_from); ?>
            </select>
            <span style="color: red;">*</span>
    </tr>


    <tr>
        <td></td>
        <td><button  class='datatable_search_button gbutton' id="item_submit">提交</button></td>
    </tr>
</table>


<script type="text/javascript">
var timepickerlang = {timeText: '<?php echo ((is_array($_tmp='时间')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', hourText: '<?php echo ((is_array($_tmp='小时')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', minuteText: '<?php echo ((is_array($_tmp='分钟')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', secondText: '<?php echo ((is_array($_tmp='秒钟')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', currentText: '<?php echo ((is_array($_tmp='现在')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
', closeText: '<?php echo ((is_array($_tmp='确定')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
'}
$('.datetimepicker').datetimepicker(timepickerlang);

    $("#item_submit").click(function(){
        var batch_id=$("#batch").val();
//        var item_id=$("input[name=item_id]").val();
//        var stime=$("input[name=stime]").val();
//        var etime=$("input[name=etime]").val();
//        var serverid = getServerId();
//        window.open('admin.php?ctrl=cdkey&act=export_submit&batch_num='+batch_num+"&item_id="+item_id+"&stime="+stime+"&etime="+etime+"&serverid="+serverid)
        window.open('admin.php?ctrl=cdkey&act=submit&type=export&batch_id='+batch_id)


    })

    function checknum(elem) {
        if (elem.value && elem.value != parseInt(elem.value))
            elem.value = ''
    }
</script>